//
//  ShowCell.m
//  时尚男士
//
//  Created by dlios on 15-6-10.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ShowCell.h"

#define HEIGHT self.contentView.frame.size.height
#define WIDTH self.contentView.frame.size.width
@implementation ShowCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.showLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_showLabel];
        _showLabel.font = [UIFont systemFontOfSize:15];
        _showLabel.numberOfLines = 0;
        
        self.showImageView1 = [[UIImageView alloc] init];
        [self.contentView addSubview:_showImageView1];
        self.showImageView2 = [[UIImageView alloc] init];
        [self.contentView addSubview:_showImageView2];
        self.showImageView3 = [[UIImageView alloc] init];
        [self.contentView addSubview:_showImageView3];
        
        [_showLabel release];
        [_showImageView3 release];
        [_showImageView2 release];
        [_showImageView1 release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat height = HEIGHT;
    CGFloat width = (WIDTH - 20) / 3;
    _showImageView1.frame = CGRectMake(5, 20, width, height - 20);
    _showImageView2.frame = CGRectMake(10 + width, 20, width, height - 20);
    _showImageView3.frame = CGRectMake(15 + width * 2, 20, width, height - 20);
    _showLabel.frame = CGRectMake(0, 0, WIDTH, 20);

    self.contentView.backgroundColor = [UIColor clearColor];
    _showLabel.backgroundColor = [UIColor clearColor];
}

- (void)dealloc
{
    [_showImageView1 release];
    [_showImageView2 release];
    [_showImageView3 release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
